From: Wei Liu Date: Mon, 17 Aug 2015 18:57:01 +0000 (+0100) Subject: libxc: fix vNUMA memory allocation X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~2621 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/%22bookmarks://%22/%22http:/www.example.com/cgi/%22https:/%22bookmarks:/%22?a=commitdiff_plain;h=7b99717f62caeac08eea224a177cd28f047ac4b5;p=xen.git libxc: fix vNUMA memory allocation Only 4KB allocation was using new_memflags. We should use new_memflags in for 2MB and 1GB allocation as well because that variable contains node information. Without this patch, when creating a HVM guest with vNUMA, because the node information was not present in the flags passed to libxc, actual memory allocation didn't comply with what user specified. With this patch the behaviour is correct. Reported-by: Boris Ostrovsky Tested-by: Boris Ostrovsky Signed-off-by: Wei Liu Reviewed-by: Dario Faggioli Acked-by: Ian Campbell --- diff --git a/tools/libxc/xc_hvm_build_x86.c b/tools/libxc/xc_hvm_build_x86.c index ec11f1567e..ea250ddac4 100644 --- a/tools/libxc/xc_hvm_build_x86.c +++ b/tools/libxc/xc_hvm_build_x86.c @@ -486,7 +486,8 @@ static int setup_guest(xc_interface *xch, done = xc_domain_populate_physmap(xch, dom, nr_extents, SUPERPAGE_1GB_SHIFT, - memflags, sp_extents); + new_memflags, + sp_extents); if ( done > 0 ) { @@ -526,7 +527,8 @@ static int setup_guest(xc_interface *xch, done = xc_domain_populate_physmap(xch, dom, nr_extents, SUPERPAGE_2MB_SHIFT, - memflags, sp_extents); + new_memflags, + sp_extents); if ( done > 0 ) {